<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    function fn(a, b, c){
        console.log(this, a, b, c);
        return 365;
    }

    var r1 = fn("hello", "world", 123);
    console.log(r1)

    var r2 = fn.call("hello", "world", 123);
    console.log(r2);
    
    var r3 = fn.call({}, "hello", "world", 123);
    console.log(r3);
    
    var r4 = fn("hello", "world", 123);
    console.log(r4);

    console.log("=========")
    
    var r5 = fn.apply("hello", ["world", 123]);
    console.log(r5);
    
    var r6 = fn.apply({}, ["hello", "world", 123]);
    console.log(r6);

    console.log("=========");
    
    var r7 = fn.bind("hello", "world", 123);
    console.log(r7);
    r7()
    
    var r8 = fn.bind({}, "hello", "world", 123);
    console.log(r8);
    r8()

    console.log("========");

    fn.call("hello");
    fn.call(12);
    fn.call(0);
    fn.call(-4);
    fn.call(NaN);
    fn.call(true);
    fn.call(function(){ 1 });
    fn.call([]);
    fn.call({});

    console.log("========");

    var obj = {
        name:"obj",
        show:function(){
            console.log(this);
        }
    }

    obj.show();

    obj.show.call(undefined);

    obj.show.call(null);

    obj.show.call(obj);
    



</script>
</html>